export  const  info = {
    list:[],//接收消息
    $on:function(fnName,fn){ // [{fnName:"fn","fn":function(){}}]
        this.list.push({
            fnName,
            fn
        })
    },
    $emit:function(fnName,args){
        this.list.filter(item=>item.fnName==fnName)[0]["fn"](args);
    }
}


//  info.$emit("fn","1");
//  info.$on("fn",function(args){
//     alert(args);
//  });